package com.cotx.userprovider01.controller;

import com.cotx.userinterface.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.ws.rs.GET;
import java.util.Map;

@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping("/")
    public Map<String,Object> findAll(){
        Map<String, Object> map = userService.findAll();
        map.put("version","UserProvider01");
        return map;
    }

}
